<template xmlns="">
  <div class="home">
    <img alt="Vue logo" src="../assets/logo.png">
    <v-md-editor  v-model="text" height="400px" @copy-code-success="handleCopyCodeSuccess"></v-md-editor>
<!--    <v-md-editor-->
<!--        v-model="form.artContent"-->
<!--    :autofocus="true"-->
<!--    height="400px"-->
<!--    width="100%"-->
<!--    ref="editor"-->
<!--    :left-toolbar="leftBar"-->
<!--    :right-toolbar="rightBar"-->
<!--    :disabled-menus="[]"-->
<!--    @upload-image="handleUploadImage"-->
<!--    ></v-md-editor>-->
    <button @click="getMsg">信息</button>
<!--    <HelloWorld msg="Welcome to Your Vue.js App"/>-->
  </div>
</template>

<script>
// @ is an alias to /src
import HelloWorld from '@/components/HelloWorld.vue'
export default {
  name: 'HomeView',
  setup(){
    return{
      text: '```json\n' +
          '{\n' +
          '  "key": "value"\n' +
          '}\n' +
          '```',
    }
  },
  components: {
    HelloWorld
  },
  methods:{
    handleCopyCodeSuccess(code) {
      console.log(code);
    },
    getMsg(){
      console.log(this.text)
    }
  }
}
</script>
